import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user.js'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    H_top: 0, //胶囊按钮到页面顶部的距离
    H_height: 0, //胶囊按钮的高度
    H_content: 0, //以上两者加起来的值
  },
  mutations: {
    setHeight(state, info) {
      state.H_top = info.H_top;
      state.H_height = info.H_height;
      state.H_content = info.H_top + info.H_height;
    }
  },
  modules: {
    user
  }
})

export default store
